<template>
  <div id="app">
    <!-- <div id="nav">
      <router-link to="/">Home</router-link> |
      <router-link to="/about">About</router-link>
    </div> -->
    <router-view/>
  </div>
</template>

<script>
export default {
  methods:{
        _isMobile() {
            //判断当前环境是pc端还是移动端
             let flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
             return flag;
        }
  },
  mounted(){
    if (this._isMobile()) {
      console.log("手机端");
      // this.$router.replace('/home1');
    } else {
      console.log("pc端");
      // this.$router.replace('/about');
    }   
  }
}
</script>

<style lang="scss">
body,html{width:100%;height:100%;}
body{margin:0px;padding:0px;}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  width:100%;height:100%;margin:0;padding:0;
  .v-modal{display: none !important;}
}

</style>
